package com.zenithmind.user.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zenithmind.user.pojo.domain.Role;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Data
@Schema(name = "用户VO", description = "用户VO")
public class UserVO {
    @Schema(description = "主键")
    private String id;

    @Schema(description = "用户名")
    private String username;

    @Schema(description = "昵称")
    private String nickname;

    @Schema(description = "头像 URL")
    private String avatar;

    @Schema(description = "邮箱")
    private String email;

    @Schema(description = "手机号")
    private String mobile;

    @Schema(description = "手机号（兼容性字段）")
    private String phone;

    @Schema(description = "个人简介")
    private String intro;

    @Schema(description = "个人简介（兼容性字段）")
    private String introduction;

    @Schema(description = "状态 (0-禁用, 1-启用)")
    private Integer status;

    @Schema(description = "最后登录时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime lastLoginTime;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @Schema(description = "角色")
    private Role role;

    @Schema(description = "登录token")
    private String token;

    @Schema(description = "存储使用量")
    private Long storageUsed;

    @Schema(description = "存储限制")
    private Long storageLimit;
}
